import { config } from '../../config/index';
import { request } from '../../utils/request'

const app = getApp();

function mockFetchUserDetails() {
  return ;
}

export function fetchUserDetails(id) {
  if (config.useMock) {
    return mockFetchUserDetails();
  } 
  const apiPath = 'user/' + id;
  
  return request(apiPath).then((res) => {
    return res;
  });
}